#ifndef __PVM3DINTERFACE_H__
#define __PVM3DINTERFACE_H__

#include "pvm/pvmtypes.h"

class IPVM3DInterface
{
protected:
	IPVM3DInterface() {};
public:
	virtual ~IPVM3DInterface() {};

	virtual pvm_int32 GetRealizationType() = 0;//hardware, software float or fixed point

	virtual void Update() = 0;

	virtual pvm_bool Enable() = 0;
	virtual void Disable() = 0;

	virtual pvm_bool GetSupportedDistanceModels(pvm_int32* model) = 0;
	virtual pvm_bool SetDistanceModel(pvm_int32 model) = 0;
	virtual pvm_bool GetDistanceModel(pvm_int32* model) = 0;

	virtual pvm_bool ControlEnable(pvm_int32 chanelNum) = 0;
	virtual pvm_bool ControlDisable(pvm_int32 chanelNum) = 0;
	virtual pvm_bool IsControlEnabled(pvm_int32 chanelNum) = 0;

	virtual pvm_bool SetStopOnDistance(pvm_int32 chanelNum, pvm_bool flag) = 0;
	virtual pvm_bool SetVoiceRate(pvm_int32 chanelNum, pvm_int32 value) = 0;
	virtual pvm_bool SetVoiceMaxVolume(pvm_int32 chanelNum, pvm_int32 value) = 0;

	virtual pvm_bool GetStopOnDistance(pvm_int32 chanelNum, pvm_bool* flag) = 0;
	virtual pvm_bool GetVoiceRate(pvm_int32 chanelNum, pvm_int32* value) = 0;
	virtual pvm_bool GetVoiceMaxVolume(pvm_int32 chanelNum, pvm_int32* value) = 0;

	//scalar dependent
	//floating point
	virtual pvm_bool SetListenerPosition_f(float x, float y, float z) = 0;
	virtual pvm_bool SetListenerVelocity_f(float x, float y, float z) = 0;
	virtual pvm_bool SetListenerOrientation_f(float xFront, float yFront, float zFront, float xTop, float yTop, float zTop) = 0;
	virtual pvm_bool SetDopplerFactor_f(float factor) = 0;
	virtual pvm_bool SetUnitSize_f(float size) = 0;

	virtual pvm_bool GetListenerPosition_f(float* x, float* y, float* z) = 0;
	virtual pvm_bool GetListenerVelocity_f(float* x, float* y, float* z) = 0;
	virtual pvm_bool GetListenerOrientation_f(float* xFront, float* yFront, float* zFront, float* xTop, float* yTop, float* zTop) = 0;
	virtual pvm_bool GetDopplerFactor_f(float* factor) = 0;
	virtual pvm_bool GetUnitSize_f(float* size) = 0;

	virtual pvm_bool SetVoicePosition_f(pvm_int32 chanelNum, float x, float y, float z) = 0;
	virtual pvm_bool SetVoiceVelocity_f(pvm_int32 chanelNum, float x, float y, float z) = 0;
	virtual pvm_bool SetVoiceDirection_f(pvm_int32 chanelNum, float x, float y, float z) = 0;
	virtual pvm_bool SetVoiceMinDistance_f(pvm_int32 chanelNum, float d) = 0;
	virtual pvm_bool SetVoiceMaxDistance_f(pvm_int32 chanelNum, float d) = 0;
	virtual pvm_bool SetRolloffFactor_f(pvm_int32 chanelNum, float factor) = 0;

	virtual pvm_bool GetVoicePosition_f(pvm_int32 chanelNum, float* x, float* y, float* z) = 0;
	virtual pvm_bool GetVoiceVelocity_f(pvm_int32 chanelNum, float* x, float* y, float* z) = 0;
	virtual pvm_bool GetVoiceDirection_f(pvm_int32 chanelNum, float* x, float* y, float* z) = 0;
	virtual pvm_bool GetVoiceMinDistance_f(pvm_int32 chanelNum, float* d) = 0;
	virtual pvm_bool GetVoiceMaxDistance_f(pvm_int32 chanelNum, float* d) = 0;
	virtual pvm_bool GetRolloffFactor_f(pvm_int32 chanelNum, float* factor) = 0;

	//fixed point
	virtual pvm_bool SetListenerPosition_x(pvm_int32 x, pvm_int32 y, pvm_int32 z) = 0;
	virtual pvm_bool SetListenerVelocity_x(pvm_int32 x, pvm_int32 y, pvm_int32 z) = 0;
	virtual pvm_bool SetListenerOrientation_x(pvm_int32 xFront, pvm_int32 yFront, pvm_int32 zFront, pvm_int32 xTop, pvm_int32 yTop, pvm_int32 zTop) = 0;
	virtual pvm_bool SetDopplerFactor_x(pvm_int32 factor) = 0;
	virtual pvm_bool SetUnitSize_x(pvm_int32 size) = 0;

	virtual pvm_bool GetListenerPosition_x(pvm_int32* x, pvm_int32* y, pvm_int32* z) = 0;
	virtual pvm_bool GetListenerVelocity_x(pvm_int32* x, pvm_int32* y, pvm_int32* z) = 0;
	virtual pvm_bool GetListenerOrientation_x(pvm_int32* xFront, pvm_int32* yFront, pvm_int32* zFront, pvm_int32* xTop, pvm_int32* yTop, pvm_int32* zTop) = 0;
	virtual pvm_bool GetDopplerFactor_x(pvm_int32* factor) = 0;
	virtual pvm_bool GetUnitSize_x(pvm_int32* size) = 0;

	virtual pvm_bool SetVoicePosition_x(pvm_int32 chanelNum, pvm_int32 x, pvm_int32 y, pvm_int32 z) = 0;
	virtual pvm_bool SetVoiceVelocity_x(pvm_int32 chanelNum, pvm_int32 x, pvm_int32 y, pvm_int32 z) = 0;
	virtual pvm_bool SetVoiceDirection_x(pvm_int32 chanelNum, pvm_int32 x, pvm_int32 y, pvm_int32 z) = 0;
	virtual pvm_bool SetVoiceMinDistance_x(pvm_int32 chanelNum, pvm_int32 d) = 0;
	virtual pvm_bool SetVoiceMaxDistance_x(pvm_int32 chanelNum, pvm_int32 d) = 0;
	virtual pvm_bool SetRolloffFactor_x(pvm_int32 chanelNum, pvm_int32 factor) = 0;

	virtual pvm_bool GetVoicePosition_x(pvm_int32 chanelNum, pvm_int32* x, pvm_int32* y, pvm_int32* z) = 0;
	virtual pvm_bool GetVoiceVelocity_x(pvm_int32 chanelNum, pvm_int32* x, pvm_int32* y, pvm_int32* z) = 0;
	virtual pvm_bool GetVoiceDirection_x(pvm_int32 chanelNum, pvm_int32* x, pvm_int32* y, pvm_int32* z) = 0;
	virtual pvm_bool GetVoiceMinDistance_x(pvm_int32 chanelNum, pvm_int32* d) = 0;
	virtual pvm_bool GetVoiceMaxDistance_x(pvm_int32 chanelNum, pvm_int32* d) = 0;
	virtual pvm_bool GetRolloffFactor_x(pvm_int32 chanelNum, pvm_int32* factor) = 0;
};

#endif
